package demo13;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class demoData2 {
    public static void main(String[] args) throws ParseException {
        Date date = new Date();
        long time = date.getTime();

        SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss EEE a");

        String rs = sdf.format(date);
        String rs2 = sdf.format(time);
        System.out.println(rs);
        System.out.println(rs2);
        System.out.println("========================");

        String dateStr = "2024年9月11日 0:0:0";
        SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss");
        Date date2 = sdf2.parse(dateStr);
        System.out.println(date2);


    }
}
